<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta content="text/html;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta http-equiv ="Pragma" content = "no-cache"/>
	<meta http-equiv="Cache-Control" content="no cache" />
	<meta http-equiv="Expires" content="0" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<meta name="format-detection" content="telephone=no"/>
	<script src="${ctxPath!}/plugins/pace/pace.min.js"></script>
	<link href="${ctxPath!}/plugins/pace/themes/pink/pace-theme-flash.css" rel="stylesheet">
	<link href="${ctxPath!}/plugins/fontawesome/css/font-awesome.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="${ctxPath!}/plugins/layui/css/layui.css" media="all"/>
	<link rel="stylesheet" type="text/css" href="${ctxPath!}/css/fs.css" media="all"/>
	<script type="text/javascript" src="${ctxPath!}/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="${ctxPath!}/plugins/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="${ctxPath!}/plugins/frame/js/fsDict.js?v=1.7.0"></script>
	<script type="text/javascript" src="${ctxPath!}/plugins/frame/js/fs.js?v=1.7.0"></script>
	<script type="text/javascript" src="${ctxPath!}/plugins/frame/js/frame.js?v=1.7.0"></script>
</head>
<body>
  <div >
   <div class="layui-fluid">
  <div class="layui-row layui-col-space1">
  	 <div class="layui-col-md12">
<div class="layui-form-query">
<form  class="layui-form" id="query_form">
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-mid">ID：</label>
			<div class="layui-input-inline" style="width: 100px;">
				<input type="tel" name="id" autocomplete="off" class="layui-input"/>
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-mid">名称：</label>
			<div class="layui-input-inline" style="width: 100px;">
				<input type="text" name="name" autocomplete="off" class="layui-input"/>
			</div>
		</div>
		<!--<div class="layui-inline">-->
			<!--<label class="layui-form-mid">时间：</label>-->
			<!--<div class="layui-input-inline" style="">-->
				<!--<input type="text" name="createDate" autocomplete="off" class="layui-input fsDate" dateRange="1" placeholder=" - "/>-->
			<!--</div>-->
		<!--</div>-->
		<div class="layui-inline">
			<div class="layui-input-inline">
				<button class="layui-btn" type="button" function="query"><i class="layui-icon">&#xe615;</i>查询</button>
			</div>
		</div>
	</div>


</form>
</div>
  	 </div>
  	 <div class="layui-col-md12">
  	 	<div class="layui-row grid-demo">
	      <div class="layui-col-md12">
        	<button class="layui-btn" function="top" topUrl="/coreMenu/add.html" topWidth="800px" isMaximize="0" topHeight="600px" topTitle="新增">
			  <i class="layui-icon">&#xe654;</i>新增
			</button>
			<button class="layui-btn layui-btn-danger" function="submit" method="post" url="/coreMenu/deleteBatch.do" isMutiDml="1" isConfirm="1" confirmMsg="是否确定删除选中的数据？" inputs="id:">
			  <i class="layui-icon">&#xe640;</i>批量删除
			</button>
			<button class="layui-btn" function="refresh">
			  <i class="layui-icon">&#xe669;</i>刷新
			</button>
			  <i id='help' style='color:#FF5722;cursor:pointer;' class='layui-icon'>&#xe702;</i>
			<!--<button class="layui-btn" function="test">-->
			  <!--<i class="layui-icon">&#xe756;</i>测试-->
			<!--</button>-->
	      </div>
	      <div class="layui-col-md12">
	         <table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid" isLoad="1" url="/coreMenu/page.json" isPage="1" sortType="0" pageSize="10" defaultForm="query_form" height="full-135"></table>

	         <div class="fsDatagridCols">
						<p type="numbers" title="#"/>
						<p checkbox="true"/>
						<p field="id" title="ID" width="100" sort="true"/>
						<p field="name" title="名称" width="150"  />
				 		<p field="permission" title="权限代码" width="150"  />
						<p field="url" title="链接" width="150" />
						<p field="icon" title="图标" width="100" templet="#iconTpl" />
						<p field="parentid" title="父级" dict="menu" width="100" />
						<p field="createtime" title="创建时间" width="180" templet="#createtimeTpl"/>
						<p field="updatetime" title="修改时间" width="180" templet="#updatetimeTpl"/>
						<p fixed="right" align="center" toolbar="#barDemo" title="操作" width="250"/>
					</div>

			<script type="text/html" id="iconTpl">
				{{# if(d.icon.indexOf("<i") == 0){ }}
				{{# return d.icon;}}
				{{#}else if (d.icon.indexOf("&#") == 0){}}
				{{#return '<i class="layui-icon">'+d.icon+'</i>'}}
				{{#}else if (d.icon.indexOf("fa-") == 0){}}
				{{#return '<i class="fa '+d.icon+'"></i>'}}
				{{#}else if (d.icon.indexOf("layui-") == 0){}}
				{{#return '<i class="layui-icon '+d.icon+'"></i>'}}
				{{#}else {}}
				{{#return '<i class="'+d.icon+'"></i>'}}
				{{#}}}
			</script>
			  <script type="text/html" id="createtimeTpl">
				  {{#  return layui.fsUtil.toDateString(d.createtime) }}
			  </script>
			  <script type="text/html" id="updatetimeTpl">
				  {{#  return layui.fsUtil.toDateString(d.updatetime) }}
			  </script>
			<script type="text/html" id="barDemo">
				<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top" topUrl="/coreMenu/edit.html" topMode="readonly" topWidth="800px" topHeight="600px" topTitle="查看" inputs="id:">查看</a>
 				<a class="layui-btn layui-btn-xs" lay-event="top" topUrl="/coreMenu/edit.html" topWidth="800px" topHeight="600px" topTitle="编辑" inputs="id:">编辑</a>
  				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="/coreMenu/delete.do" isConfirm="1" method="post" confirmMsg="是否确定删除当前记录？" inputs="id:">删除</a>
				<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="top" topUrl="/coreButton/index.html" topWidth="1000px" topHeight="800px" topTitle="子权限管理" inputs="menuid:$id">子权限管理</a>
				<!--<a class="layui-btn layui-btn-xs" lay-event="test2" >测试</a>-->
			</script>
	      </div>
	    </div>
  	 </div>
  </div>
</div>
</div>

<script type="text/javascript">
    layui.fsButton.test2 = function(elem,data,datagrid){
        alert("测试自定义按钮2"+JSON.stringify(data));
    };
    layui.use(['form','layer'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            form = layui.form;

        var helpTip="<span style='color:red;'>子权限管理</span></br>主要是针对菜单下按钮级别的操作进行权限控制</br>该功能主要适用于三级菜单</br>";
        $("#help").on('mouseenter', function () {
            this.index = layer.tips(helpTip, this, {
                tips: [2, '#3A3D49'],
                time: -1
            });
        }).on('mouseleave', function () {
            layer.close(this.index);
        });

    });
</script>
</body>
</html>
